package com.pratik.android.smssniffer.telelphony.impl;

import com.pratik.android.smssniffer.telelphony.MessageGeneratorService;
import com.pratik.android.smssniffer.telelphony.SmsService;

public class TelephonyServiceRegistry {
	
   private static TelephonyServiceRegistry instance;
   
   public static TelephonyServiceRegistry getInstance(){
	   if(instance == null){
		   return instance = new TelephonyServiceRegistry();
	   }
	   return instance;
   }
   
   private boolean init = false;
   private SmsService smsService;
   private MessageGeneratorService messageGeneratorService;
   
   public void init(){
	   if(init) return;
	   
	   smsService = new SmsServiceImpl();
	   messageGeneratorService = new MessageGeneratorServiceImpl();
	   
	   init = true;
   }
   
   public SmsService getSmsService(){
	   return smsService;
   }
   
   public MessageGeneratorService getMessageGeneratorService(){
	   return messageGeneratorService;
   }
}
